<template>
  <div class="home">
    <h1>欢迎回来</h1>
    <div v-if="user" class="user-info">
      <p>用户名: {{ user.profile.name }}</p>
      <p>邮箱: {{ user.profile.email }}</p>
    </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  name: 'Home',
  computed: {
    ...mapGetters(['user'])
  }
}
</script>

<style scoped>
.home {
  padding: 20px;
}

.user-info {
  margin-top: 20px;
  padding: 20px;
  background-color: #f5f5f5;
  border-radius: 4px;
}
</style> 